%%-*- mode: erlang -*-
{cover_enabled, true}.

{erl_opts, [debug_info, fail_on_warning,
            {platform_define, "^[0-9]+", namespaced_types},
            {parse_transform, lager_transform}]}.

{deps, [{lager, "3.9.2"},
        recon,
        folsom,
        {jsx, "3.0.0"},
        {dns_erlang, ".*", {git, "https://github.com/dnsimple/dns_erlang.git", {branch, "main"}}},
        iso8601,
        {nodefinder, "2.0.0"},
        {opentelemetry_api, "0.6.0"},
        {meck, "0.9.2"}
]}.

{profiles, [{test, [{deps, [proper]}]}]}.

{project_plugins, [rebar3_format]}.

{format, [
          {formatter, default_formatter},
          {files, [
                   "src/**/*.?rl", "include/**/*.?rl"
                  ]},
          {options, #{
             paper => 160,
             ribbon => 150,
             inline_attributes => none,
             inline_qualified_function_composition => true}
          }]
}.

{shell, [{apps, [erldns]},
         {config, "erldns.config"}]}.

{relx, [{release, {erldns, "3.0.0"},
         [erldns]},

        {dev_mode, true},
        {include_erts, false},
        {sys_config, "erldns.config"},
        {overlay, [{copy, "priv/example.zone.json", "priv/example.zone.json"},
                   {copy, "priv/test.zones.json", "priv/test.zones.json"}]},

        {extended_start_script, true}]}.

%% This is a rebar3-ism
{overrides, [
    {override, dns_erlang,
        [
            {plugins,[
                {provider_asn1, "0.2.3"}
            ]},
            {provider_hooks, [
                {pre, [
                    {compile, {asn, compile}}
                ]},
                {post, [
                    {clean, {asn, clean}}
                ]}
            ]}
        ]
    }
]}.
